import React from "react";
import { notFound } from "next/navigation";

import { isValidMonthParam } from "@/lib/frontend/params";

export default async function MonthLayout({ children, params }) {
	const { month } = await params;

	if (!isValidMonthParam(month)) {
		notFound();
	}

	return children;
}
